<%--
  Created by IntelliJ IDEA.
  User: 00
  Date: 2021/5/8
  Time: 22:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>查询</title>
</head>
<style>
    body{
        text-align: center;
    }
    a{
        text-decoration: none;
    }

</style>
<body>
<h1>学生信息查询</h1>
<table border="2" width="300" align="center">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>成绩</th>
        <th colspan="2">操作</th>
    </tr>
    <c:forEach items="${stulist}" var="stu">
    <tr>
        <td><c:out value="${stu.value.id}"></c:out></td>
        <td><c:out value="${stu.value.name}"></c:out></td>
        <td><c:out value="${stu.value.sex}"></c:out></td>
        <td><c:out value="${stu.value.score}"></c:out></td>
        <!-- 这个href属性是提交到地址栏的值,而servlet是通过地址栏获取到提交的值-->
        <td><a href="ServletRemove?name=${stu.value.id}">删除</a></td>
        <td><a href="ServletUpdata?name="${stu.value.id}">修改</a></td>
    </tr>
    </c:forEach>
</table>
<label for="aaa"></label>
<button style="width: 300px" ><a href="entry.jsp"  name="aaa">返回主页</a></button>
</body>
</html>
